#include "MediaSource.h"
#include "XMLConfig2.h"
#include "MediaTransport.h"
//#include "SSMonitorItems.h"

UInt32 CMediaSource::m_BaseID = MSID_INVALID_ID;
OSMutex CMediaSource::m_BaseIDMutex;


CMediaSource::CMediaSource()
{
	m_BaseIDMutex.Lock();
	m_ID = ++m_BaseID;
	m_BaseIDMutex.Unlock();
	
	m_nRangeTime = 0;
	m_nStartTime = 0;
	m_nPlayingPoint = 0;
	m_FileSize = (UInt32)-1;
	m_IsInitialize = FALSE;

	m_pMediaTransport = NULL;

//	CSSMonitorItems::Instance().IncCount( STAT_MEDIASOURCE_TOTAL );
}

CMediaSource::~CMediaSource()
{
	OutputDebugString("CMediaSource::~CMediaSource\n");
//	CSSMonitorItems::Instance().DecCount( STAT_MEDIASOURCE_TOTAL );
}

Bool CMediaSource::Initialize(CBusinessDNA &inBusinessDNA, CMediaTransport *pTransport)
{
	m_cBusinessDNA = inBusinessDNA;

	m_pMediaTransport = pTransport;
	return TRUE;
}






